#ifndef __REVENG_CONDITIONWIN32_HPP__
#define __REVENG_CONDITIONWIN32_HPP__

#include <RevEng/ICondVar.hpp>
#include "WinHeader.h"

namespace RevEng
{
	class CondVarWin32 : public ICondVar
	{
	protected:
		int m_nWaitersCount;
		CRITICAL_SECTION m_pWaitersCountGuard;

		enum
		{
			SIGNAL = 0,
			BROADCAST = 1
		};

		HANDLE m_ahEvents[2];

	public:
		CondVarWin32();
		virtual ~CondVarWin32();
		virtual void Wait( IMutex* Mut );
		virtual void Signal();
		virtual void Broadcast();
	};
}

#endif//__REVENG_CONDITIONWIN32_HPP__
